{include file=$header_start}
{strip}
<script type="text/javascript" src="{$siteroot}/includes/js/admin/checkall.js" /></script>
{/strip}
{include file=$header_end}
{literal}
<script type="text/javascript">
$(function(){
$(".someClass").tipTip();
});

$(function(){
$(".someClass").tipTip({maxWidth: "auto", edgeOffset: 10});
});
</script>
{/literal}
<div class="contain">
      {include file=$left_menu}
      <div class="right_contain">
         <div class="heading_box">{$user_details.first_name|ucfirst} {$user_details.last_name|ucfirst}'s Work Photos</div>
         <div class="whitebox">
         <!--Message Div Start-->
         {if $msg}
         <div class="masg_div">
         	{$msg}
         </div>
         {/if}
         <!--Message Div End-->
         <div>
          <!--Form Contain start-->
           <div class="table_viewbox">
            <!--<h2>Table Design</h2>-->
            <form name="searchFrm" id="searchFrm" method="post" action="{$siteroot}/admin/home.php?q=tradesmanuserworkphoto&id={$smarty.get.id}">
            	<table width="100%" border="0" cellpadding="3" cellspacing="5">
                	<tr>
	                    <td align="left"><input type="button" value="Upload Work Photo" class="admin_btn" onclick="javascript: window.location='{$siteroot}/admin/home.php?q=addtradesmanuserworkphoto&id={$smarty.get.id}';"/></td>
                        <td align="right"><input type="text" name="search" id="search" class="input41" value="{if $search neq ''}{$search}{else}Title{/if}" onfocus="this.value=''" onblur="if(this.value=='')this.value='Title'" />&nbsp;<input type="submit" name="add" id="add" value="Search" class="admin_btn" />&nbsp;<input type="button" name="add" id="add" value="Clear" class="admin_btn" onclick="javascript: window.location='{$siteroot}/admin/home.php?q=tradesmanuserworkphoto&id={$smarty.get.id}';" />&nbsp;<input type="button" value="Back" class="admin_btn" onclick="javascript: window.location='{$siteroot}/admin/home.php?q=tradesmanuser';" /></td>
                    </tr>
                </table>
            </form>
            <form name="frm" id="frm" action="" method="post" >
            <input type="hidden" name="hidden_pageno" id="hidden_pageno" value="{$page}" />
            <table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_viewbox">
              <tr>
                <th width="3%" align="center">#</th>
                
                <th width="50%">Title</th>
                <th width="25%">Work Photo</th>                
                <th width="20%">Action</th>
              </tr>
              {if $userArray}
              {section name=i loop=$userArray}
              <tr class="inactiverow" id="tr_{$userArray[i].id}">
                <td align="center" valign="top">{$newid}</td>
                <td valign="top">{$userArray[i].title|stripslashes}</td>
                <td><img src="{$siteroot}/includes/image.php?width=100&amp;height=100&amp;image={$siteroot}/uploads/tradesmanjobs/{$userArray[i].image}" title="workphoto" alt="workphoto"/></td>
                <td valign="top">
                    <span><a href="{$siteroot}/admin/home.php?q=addtradesmanuserworkphoto&id={$smarty.get.id}&photoid={$userArray[i].photo_id|base64_encode}&page={$page}" title="Edit Work Photo"><img src="{$siteroot}/templates/admin/img/icon_edit.png"/></a></span>
                    
                    <span><a href="{$siteroot}/admin/home.php?q=tradesmanuserworkphoto&id={$smarty.get.id}&photoid={$userArray[i].photo_id|base64_encode}&action=delete&page={$page}" title="Delete Work Photo"><img src="{$siteroot}/templates/admin/img/icon-delete.png" onclick="javascript:return confirm('Are you sure do you want to delete this record?');" /></a></span>
                </td>
              </tr>
              <!-- {$newid++} -->
              {/section}
               {else}
              <tr>
               <td colspan="4" align="center" class="error">Record Not Found</td>
              </tr>
              {/if}
               <tr>
                <td colspan="4">
                 
                  <div class="pagination">
                  {if $pagination}{$pagination}{/if}
                  </div>
                   </td>
                  
              </tr>
            </table>
</form>
         </div>
            <!--Form Contain end--> 
         </div>
         </div>
        </div>
      <!--right_contain end-->
      <div class="clear"></div>
    </div>
{include file=$footer}